|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
ParserFactoryImpl.java | - | 90.9% | 100% | 93.3% |
|
1 |
/*
|
|
2 |
* Copyright 2001-2004 The Apache Software Foundation.
|
|
3 |
*
|
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5 |
* you may not use this file except in compliance with the License.
|
|
6 |
* You may obtain a copy of the License at
|
|
7 |
*
|
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9 |
*
|
|
10 |
* Unless required by applicable law or agreed to in writing, software
|
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13 |
* See the License for the specific language governing permissions and
|
|
14 |
* limitations under the License.
|
|
15 |
*/
|
|
16 |
|
|
17 |
package org.apache.geronimo.ews.ws4j2ee.parsers.impl;
|
|
18 |
|
|
19 |
import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
|
|
20 |
import org.apache.geronimo.ews.ws4j2ee.context.j2eeDD.EJBContext;
|
|
21 |
import org.apache.geronimo.ews.ws4j2ee.context.j2eeDD.WebContext;
|
|
22 |
import org.apache.geronimo.ews.ws4j2ee.context.webservices.client.interfaces.ServiceReferanceContext;
|
|
23 |
import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.WSCFException;
|
|
24 |
import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFContext;
|
|
25 |
import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.xmlbeans.WSCFContextImpl;
|
|
26 |
import org.apache.geronimo.ews.ws4j2ee.parsers.DomEJBDDParser;
|
|
27 |
import org.apache.geronimo.ews.ws4j2ee.parsers.ParserFactory;
|
|
28 |
import org.apache.geronimo.ews.ws4j2ee.parsers.ServiceReferanceParser;
|
|
29 |
import org.apache.geronimo.ews.ws4j2ee.parsers.WebDDParser;
|
|
30 |
import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
|
|
31 |
|
|
32 |
import java.io.InputStream;
|
|
33 |
|
|
34 |
/**
|
|
35 |
* @author hemapani@opensource.lk
|
|
36 |
*/
|
|
37 |
public class ParserFactoryImpl implements ParserFactory { |
|
38 |
|
|
39 |
/* (non-Javadoc)
|
|
40 |
* @see org.apache.geronimo.ews.ws4j2ee.parsers.ParserFactory#parseEJBDDContext(org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext, java.io.InputStream)
|
|
41 |
*/
|
|
42 | 8 |
public EJBContext parseEJBDDContext(J2EEWebServiceContext context,
|
43 |
InputStream inputStream) |
|
44 |
throws GenerationFault {
|
|
45 | 8 |
DomEJBDDParser ejbDDparser = new DomEJBDDParser(context);
|
46 | 8 |
ejbDDparser.parse(inputStream); |
47 | 8 |
return ejbDDparser.getContext();
|
48 |
} |
|
49 |
|
|
50 |
/* (non-Javadoc)
|
|
51 |
* @see org.apache.geronimo.ews.ws4j2ee.parsers.ParserFactory#parseServiceReferance(org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext, java.io.InputStream)
|
|
52 |
*/
|
|
53 | 4 |
public ServiceReferanceContext parseServiceReferance(J2EEWebServiceContext context,
|
54 |
InputStream inputStream) |
|
55 |
throws GenerationFault {
|
|
56 | 4 |
ServiceReferanceParser parser = new ServiceReferanceParser(inputStream);
|
57 | 4 |
return parser.getRef();
|
58 |
} |
|
59 |
|
|
60 |
/* (non-Javadoc)
|
|
61 |
* @see org.apache.geronimo.ews.ws4j2ee.parsers.ParserFactory#parseWebDD(org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext, java.io.InputStream)
|
|
62 |
*/
|
|
63 | 3 |
public WebContext parseWebDD(J2EEWebServiceContext context,
|
64 |
InputStream inputStream) |
|
65 |
throws GenerationFault {
|
|
66 | 3 |
WebDDParser parser = new WebDDParser(context);
|
67 | 3 |
parser.parse(inputStream); |
68 | 3 |
return parser.getContext();
|
69 |
} |
|
70 |
|
|
71 |
/* (non-Javadoc)
|
|
72 |
* @see org.apache.geronimo.ews.ws4j2ee.parsers.ParserFactory#parseWSCF(org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext, java.io.InputStream)
|
|
73 |
*/
|
|
74 | 13 |
public WSCFContext parseWSCF(J2EEWebServiceContext context,
|
75 |
InputStream inputStream) |
|
76 |
throws GenerationFault {
|
|
77 | 13 |
try {
|
78 | 13 |
return new WSCFContextImpl(inputStream, context); |
79 |
} catch (WSCFException e) {
|
|
80 | 0 |
throw GenerationFault.createGenerationFault(e);
|
81 |
} |
|
82 |
} |
|
83 |
|
|
84 |
} |
|
85 |
|
|